package com.zb.zeus.system.api;

import com.zb.zeus.common.core.domain.R;
import com.zb.zeus.system.api.domain.dto.*;
import com.zb.zeus.system.api.factory.RemoteSysWxMsgFallbackFactory;
import io.swagger.annotations.ApiOperation;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

import javax.validation.Valid;

/**
 * 系统服务-发企业微信
 * 
 * @author liangfan
 * @date 2021/07/12 15:26
 **/

@FeignClient(contextId = "remoteSysWxMsgService",
        value = "${feign.ref.service.zeus-system:zeus-system}",
    fallbackFactory = RemoteSysWxMsgFallbackFactory.class)
public interface RemoteSysWxMsgService {

    @ApiOperation("发文本应用消息")
    @PostMapping("/wx/sendAppTextMsg")
    R<WxMsgRspDTO> sendAppTextMsg2Wx(@RequestBody @Valid WxAppTextMsgDTO wxAppTextMsgDTO);

    @ApiOperation("发图文应用消息")
    @PostMapping("/wx/sendAppNewsMsg")
    R<WxMsgRspDTO> sendAppNewsMsg2Wx(@RequestBody @Valid WxAppNewsMsgDTO wxAppNewsMsgDTO);

    @ApiOperation("发卡片应用消息")
    @PostMapping("/wx/sendAppTextCardMsg")
    R<WxMsgRspDTO> sendAppTextCardMsg2Wx(@RequestBody @Valid WxAppTextCardDTO wxAppTextCardDTO);

    @ApiOperation("发文本群消息")
    @PostMapping("/wx/sendGroupTextMsg")
    R<WxMsgRspDTO> sendGroupTextMsg2Wx(@RequestBody @Valid WxGroupTextMsgDTO wxGroupTextMsgDTO);

    @ApiOperation("发图文群消息")
    @PostMapping("/wx/sendGroupNewsMsg")
    R<WxMsgRspDTO> sendGroupNewsMsg2Wx(@RequestBody @Valid WxGroupNewsMsgDTO wxGroupNewsMsgDTO);

    @ApiOperation("发卡片群消息")
    @PostMapping("/wx/sendGroupTextCardMsg")
    R<WxMsgRspDTO> sendGroupTextCardMsg2Wx(@RequestBody @Valid WxGroupTextCardMsgDTO wxGroupTextCardMsgDTO);
}
